import React, { lazy } from "react";
import { Redirect } from "react-router-dom";

export default [
    {
        path: "/",
        exact: true,
        render: () => <Redirect to="/home" />,
    },
    {
        path: "/home",
        component: lazy(() => import("../pages/home/Root/Root")),
    },
    {
        path: "/category",
        component: lazy(() => import("../pages/category/Root/Root")),
    },
    {
        path: "/mine",
        component: lazy(() => import("../pages/mine/Root/Root")),
    },
    {
        path: "/cart",
        exact: true,
        component: lazy(() => import("../pages/cart/Root/Root")),
       
    },
    {
        path: "/order",
        component: lazy(() => import("../pages/cart/Order/Root")),
    },
    // {
    //     path: "/pay",
    //     component: lazy(() => import("../pages/cart/Order/Pay")),
    // },
    {
        path: "/detail/:id",
        component: lazy(() => import("../components/detail/Detail")),
    },
    {
        path: "/login",
        component: lazy(() => import("../components/login/Login")),
    },
    {
        path: "",
        render: () => <Redirect to="/home" />,
    },
];
